﻿/**
 *
 * @file FITKAbaqusHDF5AdaptorConnectorSection.h
 * @brief 读写HDF5文件的ConnectorSection类
 * @author fulipeng (fulipengqd@yeah.net)
 * @date 2024-07-01
 *
 */
#ifndef  _FITKABAQUSHDF5ADAPTORCONNECTORSECTION_H__
#define  _FITKABAQUSHDF5ADAPTORCONNECTORSECTION_H__

#include "FITKAbaqusIOHDF5API.h"
#include "FITKAbaqusHDF5AbstractAdaptor.h"
#include "FITK_Kernel/FITKAdaptor/FITKIOAdaptorFactory.h"
#include "FITK_Interface/FITKInterfaceIOHDF5/FITKInterfaceHDF5AdaptorSectionAssign.h"

 //前置声明
ForwardDeclarNS(Interface, FITKAbaConnectorSection)
ForwardDeclarNS(Interface, FITKAbaConnectorBehaviorEnum)
ForwardDeclarNS(Interface, FITKAbaConnectorBehavior)

namespace IO
{
    /**
     * @brief HDF5 ConnectorSection 连接器截面 读写适配器
     * @author fulipeng (fulipengqd@yeah.net)
     * @date 2024-07-01
     */
    class FITKABAQUSIOHDF5API FITKAbaqusHDF5AdaptorConnectorSection : public FITKInterfaceHDF5AdaptorSectionAssign
    {
    public:
        explicit FITKAbaqusHDF5AdaptorConnectorSection() = default;
        virtual ~FITKAbaqusHDF5AdaptorConnectorSection() = default;

        /**
         * @brief 获取适配器数据类型名
         * @return 适配器数据类型名
         * @author fulipeng (fulipengqd@yeah.net)
         * @date 2024-06-20
         */
        QString getAdaptorClass() override;

        /**
         * @brief 适配器读取
         * @return 状态 true成功， false失败
         * @author fulipeng (fulipengqd@yeah.net)
         * @date 2024-06-20
         */
        bool adaptR() override;

        /**
         * @brief 适配器写出
         * @return 状态 true成功， false失败
         * @author fulipeng (fulipengqd@yeah.net)
         * @date 2024-06-20
         */
        bool adaptW() override;

        /**
         * @brief 读取连接器截面
         * @param connectorAssignmnt 连接器截面
         * @param h5Group 数据块
         * @return 状态 true成功， false失败
         * @author fulipeng (fulipengqd@yeah.net)
         * @date 2024-07-01
         */
        bool readConnectorSection(Interface::FITKAbaConnectorSection* connectorSection, H5::Group & h5Group);

        /**
         * @brief 写出连接器截面
         * @param connectorBehavior 连接器截面
         * @param h5Group 数据块
         * @return 状态 true成功， false失败
         * @author fulipeng (fulipengqd@yeah.net)
         * @date 2024-07-01
         */
        bool writeConnectorSection(Interface::FITKAbaConnectorSection* connectorSection, H5::Group & h5Group);

        /**
         * @brief 读取连接器行为
         * @param connectorAssignmnt 连接器截面行为
         * @param h5Group 数据块
         * @return 状态 true成功， false失败
         * @author fulipeng (fulipengqd@yeah.net)
         * @date 2024-07-01
         */
        bool readConnectorAssignment(Interface::FITKAbaConnectorBehavior* connectorBehavior, H5::Group & h5Group);

        /**
         * @brief 写出连接器行为
         * @param connectorBehavior 连接器截面行为
         * @param h5Group 数据块
         * @return 状态 true成功， false失败
         * @author fulipeng (fulipengqd@yeah.net)
         * @date 2024-07-01
         */
        bool writeConnectorAssignment(Interface::FITKAbaConnectorBehavior* connectorBehavior, H5::Group & h5Group);

        /**
         * @brief 读取连接器行为 弹性
         * @param connectorAssignmnt 连接器行为 弹性
         * @param h5Group 数据块
         * @return 状态 true成功， false失败
         * @author fulipeng (fulipengqd@yeah.net)
         * @date 2024-07-01
         */
        bool readBehaviorElasticity(Interface::FITKAbaConnectorBehavior* connectorBehavior, H5::Group & h5Group);

        /**
         * @brief 写出连接器行为 弹性
         * @param connectorAssignmnt 连接器行为 弹性
         * @param h5Group 数据块
         * @return 状态 true成功， false失败
         * @author fulipeng (fulipengqd@yeah.net)
         * @date 2024-07-01
         */
        bool writeBehaviorElasticity(Interface::FITKAbaConnectorBehavior* connectorBehavior, H5::Group & h5Group);

        /**
         * @brief 读取连接器行为 减震
         * @param connectorAssignmnt 连接器行为 减震
         * @param h5Group 数据块
         * @return 状态 true成功， false失败
         * @author fulipeng (fulipengqd@yeah.net)
         * @date 2024-07-01
         */
        bool readBehaviorDamping(Interface::FITKAbaConnectorBehavior* connectorBehavior, H5::Group & h5Group);

        /**
         * @brief 写出连接器行为 减震
         * @param connectorAssignmnt 连接器行为 减震
         * @param h5Group 数据块
         * @return 状态 true成功， false失败
         * @author fulipeng (fulipengqd@yeah.net)
         * @date 2024-07-01
         */
        bool writeBehaviorDamping(Interface::FITKAbaConnectorBehavior* connectorBehavior, H5::Group & h5Group);

        /**
         * @brief 读取连接器行为 锁
         * @param connectorAssignmnt 连接器行为 锁
         * @param h5Group 数据块
         * @return 状态 true成功， false失败
         * @author fulipeng (fulipengqd@yeah.net)
         * @date 2024-07-01
         */
        bool readBehaviorLock(Interface::FITKAbaConnectorBehavior* connectorBehavior, H5::Group & h5Group);

        /**
         * @brief 写出连接器行为 锁
         * @param connectorAssignmnt 连接器行为 锁
         * @param h5Group 数据块
         * @return 状态 true成功， false失败
         * @author fulipeng (fulipengqd@yeah.net)
         * @date 2024-07-01
         */
        bool writeBehaviorLock(Interface::FITKAbaConnectorBehavior* connectorBehavior, H5::Group & h5Group);

        /**
         * @brief 读取连接器行为 塑性
         * @param connectorAssignmnt 连接器行为 塑性
         * @param h5Group 数据块
         * @return 状态 true成功， false失败
         * @author fulipeng (fulipengqd@yeah.net)
         * @date 2024-07-01
         */
        bool readBehaviorPlasticity(Interface::FITKAbaConnectorBehavior* connectorBehavior, H5::Group & h5Group);

        /**
         * @brief 写出连接器行为 塑性
         * @param connectorAssignmnt 连接器行为 塑性
         * @param h5Group 数据块
         * @return 状态 true成功， false失败
         * @author fulipeng (fulipengqd@yeah.net)
         * @date 2024-07-01
         */
        bool writeBehaviorPlasticity(Interface::FITKAbaConnectorBehavior* connectorBehavior, H5::Group & h5Group);

        /**
         * @brief 读取连接器行为 停止
         * @param connectorAssignmnt 连接器行为 停止
         * @param h5Group 数据块
         * @return 状态 true成功， false失败
         * @author fulipeng (fulipengqd@yeah.net)
         * @date 2024-07-01
         */
        bool readBehaviorStop(Interface::FITKAbaConnectorBehavior* connectorBehavior, H5::Group & h5Group);

        /**
         * @brief 写出连接器行为 停止
         * @param connectorAssignmnt 连接器行为 停止
         * @param h5Group 数据块
         * @return 状态 true成功， false失败
         * @author fulipeng (fulipengqd@yeah.net)
         * @date 2024-07-01
         */
        bool writeBehaviorStop(Interface::FITKAbaConnectorBehavior* connectorBehavior, H5::Group & h5Group);
    };

    Register2FITKIOAdaptorFactory(HDF5, Interface::FITKAbaConnectorSection, FITKAbaqusHDF5AdaptorConnectorSection)

}

#endif
